﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<jsp:useBean id="dateValue" class="java.util.Date"/>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <base href="<%=basePath%>">
    <!-- jsp文件头和头部 -->
    <%@ include file="../admin/top.jsp" %>

    <style>
        table tr td img {
            height: 25px;
            border-radius: 8%;
        }

    </style>
</head>
<%--健康管理页面--%>
<body>
<div class="container-fluid" id="main-container">

    <div id="page-content" class="clearfix">
        <div class="row-fluid">
            <div class="row-fluid">
                <!-- 检索  -->
                <form action="health/healthManagement" method="post" name="userForm" id="userForm">
                    <input type="hidden" name="menuId" value="${page.menuId}">
                    <table style="width: 310px">
                        <tr>
                            <td>
						<span class="input-icon">
							<input style="margin-top: 0px;" autocomplete="off" id="nav-search-input" type="text"
                                   name="searchValue" value="${page.searchValue}" placeholder="设备imei号"/>
						</span>
                            </td>
                            <td style="vertical-align:top;">
                                <button class="btn btn-mini btn-light" onclick="search();" title="检索"
                                        style="z-index: 1055">
                                    <i id="nav-search-icon" class="icon-search"></i>
                                </button>
                            </td>
                        </tr>
                    </table>
                    <!-- 检索  -->
                    <table id="table_report" class="table table-striped table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>设备号</th>
                            <th>导入系统时间</th>
                            <th>首次登录系统时间</th>
                            <th>最后一次登录系统时间</th>
                            <th class="center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <!-- 开始循环 -->
                        <c:choose>
                            <c:when test="${not empty healthDevDataes}">
                                <c:forEach items="${healthDevDataes}" var="healthDevData">
                                    <tr style="text-align: center">
                                        <td>${healthDevData.id }</td>
                                        <td><fmt:formatDate value="${healthDevData.importTime }"
                                                            pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                        <td><fmt:formatDate value="${healthDevData.firstLoginTime }"
                                                            pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                        <td><fmt:formatDate value="${healthDevData.lastLoginTime }"
                                                            pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                        <td style="width: 60px;">
                                            <div class='hidden-phone visible-desktop btn-group'>
                                                <a class='btn btn-mini btn-info' data-toggle="modal"
                                                   data-target="#myModal"
                                                   onclick="healthDetail('${healthDevData.id}')">
                                                    查看
                                                </a>
                                            </div>
                                        </td>
                                    </tr>
                                </c:forEach>
                            </c:when>
                            <c:otherwise>
                                <tr class="main_info">
                                    <td colspan="10" class="center">${showMsg}</td>
                                </tr>
                            </c:otherwise>
                        </c:choose>
                        </tbody>
                    </table>
                    <div class="page-header position-relative">
                        <table style="width:100%;">
                            <tr>
                                <td style="vertical-align:top;">
                                    <div class="pagination"
                                         style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<div id="myModal" class="modal fade" role="dialog" aria-hidden="true" style="width: 700px; left: 35%;display: none">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">健康数据</h4>
            </div>
            <div class="modal-body">
                <%--<div id="container"--%>
                     <%--class="amap-layers"--%>
                     <%--style="width:680px; height:470px;position: relative">--%>
                <%--</div>--%>
                <a>asdasdasdsadds</a>
            </div>
        </div>
    </div>
</div>
<!-- 返回顶部  -->
<a href="#" id="btn-scroll-up" class="btn btn-small btn-inverse">
    <i class="icon-double-angle-up icon-only"></i>
</a>
<!-- 引入 -->
<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/ace-elements.min.js"></script>
<script src="static/js/ace.min.js"></script>
<script type="text/javascript">
    window._AMapSecurityConfig = {
        securityJsCode: "830498a4c3fe10c83685c7ee556e2554",
    };
</script>
<script type="text/javascript" src='http://webapi.amap.com/maps?v=2.0&key=8634cfb89333cba8c8b73b8cb4447b16'></script>
<script src="static/js/common/date-util.js"></script>

<script type="text/javascript" src="static/js/myjs/head.js"></script>
<script type="text/javascript">
    $(top.hangge());

    //检索
    function search() {
        top.jzts();
        $("#userForm").submit();
    }

    function healthDetail(imei) {

    }


</script>
</body>
</html>
